package com.myhome.money.spring.lifecycle.config;

import com.myhome.money.spring.lifecycle.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

/**
 * @author Rod
 */
public class BeanConfig {

   /* @Bean("beanPostProcessor")
    public MyBeanPostProcessor beanPostProcessor() {
        return new MyBeanPostProcessor();
    }

    @Bean("instantiationAwareBeanPostProcessor")
    public MyInstantiationAwareBeanPostProcessor instantiationAwareBeanPostProcessor() {
        return new MyInstantiationAwareBeanPostProcessor();
    }

    @Bean("beanFactoryPostProcessor")
    public MyBeanFactoryPostProcessor beanFactoryPostProcessor() {
        return new MyBeanFactoryPostProcessor();
    }

    @Scope("singleton")
    @Bean(initMethod = "myInit", destroyMethod = "myDestory")
    public Person person() {
        Person person = new Person();
        person.setAddress("广州");
        person.setName("张三");
        person.setPhone("123456789");
        return person;
    }

    @Bean
    public Student student() {
        Student student = new Student();
        student.setStuNo("201107098");
        student.setName("张三");
        return student;
    }*/

}
